package com.mxf.code.test01Plush策略;

import com.mxf.code.test01.Invoices;

/**
 * 戏剧计算类
*/
public class CalComedy extends Calculate {
    public int calAmount(Invoices perf) {
        int thisAmount = 30000;
        if (perf.getAudience() > 20) {
            thisAmount += 10000 + 500 * (perf.getAudience() - 20);
        }
        thisAmount += 300 * perf.getAudience();
        return thisAmount;
    }

    @Override
    public int calCredits(Invoices perf) {
        return super.calCredits(perf) + (int)Math.floor(perf.getAudience() /5);
    }
}
